package com.ggb.smartstudy.mapper;

import com.ggb.smartstudy.entity.RolePermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author gefangjie
 */
@Mapper
public interface RolePermissionMapper {
    // 根据角色Id查找对应的权限
    List<Integer> getPermissionIdByRoleId(@Param("roleId") Integer roleId);

    List<RolePermission> getAllRolePermissions();

    void insertRolePermission(RolePermission rolePermission);

    void deleteRolePermission(@Param("roleId") Integer roleId, @Param("permissionId") Integer permissionId);
}
